<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>{$lang_template_title}</title>
	<script language="javascript" type="text/javascript" src="../../kampungan_popup.js"></script>
	<script language="javascript" type="text/javascript">
	<!--
		function init() {
			var inst = kampungan.selectedInstance;
			var elm = inst.getFocusElement();

			alert("Got a window argument from plugin: " + kampungan.getWindowArg('some_custom_arg'));

			// Set the form item value to the selected node element name
			document.forms[0].nodename.value = elm.nodeName;
		}

		function insertSomething() {
			// Execute the mceTemplate command without UI this time
			kampunganPopup.execCommand('mceTemplate');

			// Close the dialog
			kampunganPopup.close();
		}
	//-->
	</script>
	<base target="_self" />
</head>
<body onload="kampunganPopup.executeOnLoad('init();');"> 
	<form onsubmit="insert();return false;">
		<h3>{$lang_template_title}</h3>

		<!-- Gets filled with the selected elements name -->
		<div style="margin-top: 10px; margin-bottom: 10px">
			The selected element name: <input type="text" name="nodename" />
		</div>

		<div class="mceActionPanel">
			<div style="float: left">
				<input type="button" id="insert" name="insert" value="{$lang_insert}" onclick="insertSomething();" />
			</div>

			<div style="float: right">
				<input type="button" id="cancel" name="cancel" value="{$lang_cancel}" onclick="kampunganPopup.close();" />
			</div>
		</div>
	</form>
</body> 
</html> 
